package com.lancoo.ccas53.mapper;

import com.lancoo.ccas53.entity.MajorGrade;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.ccas53.config.MybatisRedisCache;
import com.lancoo.ccas53.pojo.vo.GradeVo;
import com.lancoo.ccas53.pojo.vo.MajorVo;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 年级专业 Mapper 接口
 * </p>
 *
 * @author quin.song
 * @since 2024-05-20
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface MajorGradeMapper extends BaseMapper<MajorGrade> {

    int addBatch(@Param("majorGradeCollection") Collection<MajorGrade> majorGradeCollection);

    /**
     * 获取专业
     * @param taskId
     * @param baseCollegeId 基础平台学院id
     * @return
     */
    List<MajorVo> getMajor(@Param("taskId") Integer taskId, @Param("baseCollegeId") String baseCollegeId);

    List<GradeVo> getGrade(@Param("taskId") Integer taskId, String baseCollegeId);


    List<MajorGrade> getGradeScheme(@Param("taskId") Integer taskId);
}
